<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul></ul>
    <script>
        var str = ''
        var oul = document.getElementsByTagName('ul')[0]
        var arr = [1,2,3,4,5,6,7]
        arr.forEach(function(value,index,array){
            return str += "<li>" + value + "</li>"
        })
        oul.innerHTML = str
        
        var f = arr.map(function(value){
            return  "<li>" + value + "</li>"
        }).join("")
        oul.innerHTML = f
    </script>
</body>
</html>